const btns = document.querySelectorAll(".btn");

btns.forEach(btn => {
    btn.addEventListener("click",() => {
        stop();
        document.getElementById(btn.innerText).currentTime = 0;
        document.getElementById(btn.innerText).play()
    })
})

function stop() {
    btns.forEach(btn => {
            document.getElementById(btn.innerText).pause()
    })
}